<template>
   <!-- 加载图标样式5 -->
   <div class="loading">
      <div></div>
      <div></div>
      <div></div>
      <div></div>
   </div>
</template>

<script setup>

</script>

<style scoped lang='scss'>
.loading>div,
.loading {
   box-sizing: border-box;
   position: relative
}

.loading {
   display: block;
   font-size: 0;
   height: 32px;
   width: 32px
}

.loading>div {
   display: inline-block;
   float: none
}

.loading>div:first-child {
   animation: ball-atom-shrink 4.5s linear infinite;
   background: #1678ff;
   border-radius: 100%;
   height: 60%;
   left: 50%;
   position: absolute;
   top: 50%;
   transform: translate(-50%, -50%);
   width: 60%;
   z-index: 1
}

.loading>div:not(:first-child) {
   animation: ball-atom-zindex 1.5s steps(2) 0s infinite;
   background: none;
   height: 100%;
   left: 0;
   position: absolute;
   width: 100%;
   z-index: 0
}

.loading>div:not(:first-child):before {
   animation: ball-atom-position 1.5s ease 0s infinite, ball-atom-size 1.5s ease 0s infinite;
   border-radius: 50%;
   content: "";
   height: 10px;
   left: 0;
   margin-left: -5px;
   margin-top: -5px;
   opacity: .75;
   position: absolute;
   top: 0;
   width: 10px
}

.loading>div:nth-child(2) {
   animation-delay: .75s
}

.loading>div:nth-child(2):before {
   animation-delay: 0s, -1.125s;
   background-color: #ea4e3d
}

.loading>div:nth-child(3) {
   animation-delay: -.25s;
   transform: rotate(120deg)
}

.loading>div:nth-child(3):before {
   animation-delay: -1s, -.75s;
   background-color: #ffaa09
}

.loading>div:nth-child(4) {
   animation-delay: .25s;
   transform: rotate(240deg)
}

.loading>div:nth-child(4):before {
   animation-delay: -.5s, -.125s;
   background-color: #04be02
}

@keyframes ball-atom-position {
   50% {
      left: 100%;
      top: 100%
   }
}
</style>
